<?php
/*
Copy this file into your current active theme's directory to customize this template
This template displays one Flickr photo set
*/
global $TanTanFlickrPlugin;
$hasPrev = $page > 1;
$hasNext = ($page * $per_page) < $album['photos'];
$count = count($photos);
/*<h2><?php echo $album['title']?></h2>*/
?>
<p class="meta">
	<?php
	if ($hasPrev || $hasNext) {
	    printf(__('%1$d - %2$d of %3$d Photos', 'tantan-flickr'), (($page-1) * $per_page) + 1, (($page-1) * $per_page) + $count, $album['photos']);
	} else {
	    printf(__('%d Photos', 'tantan-flickr'), $album['photos']);
	}
	?> 
	| <a href="album/<?php echo $album['id']?>/<?php echo $album['pagename']?>" onclick="return openSlideShow('<?php echo $album['id']?>')"><?php _e('View slideshow &gt;', 'tantan-flickr');?></a>
</p>
<ul class="album_photos">
<?php foreach ($photos as $photo){
	echo '<li class="album_photo">';
	echo '<div class="image_styled album_photo_image">';
	echo '<span class="image_frame" style="width:292px;height:180px"><a class="image_icon_zoom" href="'.TanTanFlickrDisplay::href($photo, $album).'"><img width="292" height="180" src="'.THEME_INCLUDES.'/timthumb.php?src='.$photo['sizes']['Medium']['source'].'&amp;h=180&amp;w=292&amp;zc=1" /></a></span><img class="image_shadow" width="294" src="'.THEME_IMAGES.'/image_shadow.png"/>';
	echo '</div>';
	echo '<div class="album_photo_details">';
	echo '<h3 class="album_photo_title"><a href="'.TanTanFlickrDisplay::href($photo, $album).'">';
	echo $photo['title'];
	echo '</a></h3>';
	echo '<div class="album_photo_meta">';
	if (is_array($photo['tags']) && (($numTags = count($photo['tags'])) > 0)){
		echo '<div><strong>'.__('Tags: ', 'tantan-flickr').'</strong>'; 
		foreach ($photo['tags'] as $k => $tag){
			echo '<a href="../../tags/'.$tag.'/">'.$tag.'</a>'.(($k+1 < $numTags)?', ':'');
		}
		echo '</div>';
	}
	echo '<div><strong>'.__('Uploaded: ', 'tantan-flickr').'</strong> '.date(__('F j, Y', 'tantan-flickr'), (int) $photo['dates']['posted']).'</div>';
	echo '</div>';
	echo '</div>';
	echo '</li>';
}
?>
</ul>
<?php include($TanTanFlickrPlugin->getDisplayTemplate('/photoalbum-paging.html'));?>
<div class="flickr-meta-links">
<a href="http://www.flickr.com/photos/<?php echo $album['owner'];?>/sets/<?php echo $album['id'];?>/" target="_blank"><?php _e('View this album on Flickr', 'tantan-flickr');?></a>
</div>
